<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${package}.${table.beanName}Mapper">

    <resultMap id="BaseResultMap" type="${entityPath}.${table.beanName}">
        <#list table.fieldList as field>
            <#if field.primaryKey>
                <id property="${field.propertyName}" column="${field.fieldName}" jdbcType="${field.jdbcType}"/>
                <#else>
                    <result property="${field.propertyName}" column="${field.fieldName}" jdbcType="${field.jdbcType}"/>
            </#if>
        </#list>
    </resultMap>

    <sql id="Base_Column_List">
        <#list table.fieldList as field>${field.fieldName}<#sep>,<#if field_index%3==2>${"\n        "}</#if></#list>
    </sql>
</mapper>
